package core.ui.demo;

import javafx.collections.ObservableList;
import javafx.scene.control.Accordion;
import javafx.scene.control.Button;
import javafx.scene.control.TitledPane;
/**
 * @author 李瑜
 * @since JavaFX 8.0
 */
public class DemoAccordion
{
	public static Accordion getAccordion()
	{
		Accordion accordion = new Accordion();
		ObservableList<TitledPane> pane = accordion.getPanes();
		pane.add(new TitledPane("节点1", new Button("子节点1")));
		pane.add(new TitledPane("节点2", new Button("子节点2")));
		pane.add(new TitledPane("节点3", new Button("子节点3")));
		return accordion;
	}
}
